package service.impl;

import dao.AdminDao;
import dao.impl.AdminDaoImpl;
import entity.Admin;
import service.AdminService;

import java.util.List;

public class AdminServiceImpl implements AdminService {

    AdminDao adminDao = new AdminDaoImpl();

    @Override
    public Admin verify(String discount, String password) {
        return adminDao.verify(discount,password);
    }

    @Override
    public List<Admin> findAll() {
        return adminDao.findAll();
    }

    @Override
    public Admin findId(int id) {
        return adminDao.findId(id);
    }

    @Override
    public int addAll(Admin admin) {
        return adminDao.addAll(admin);
    }

    @Override
    public int update(Admin admin) {
        return adminDao.update(admin);
    }

    @Override
    public int delById(int id) {
        return adminDao.delById(id);
    }

    @Override
    public List<Admin> findAllByName(String name) {
        return adminDao.findAllByName(name);
    }
}
